package com.karson.common.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.karson.common.annotation.StringContains;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Data
@TableName(value ="ar_system_meta")
public class SystemMeta implements Serializable {
    @Serial
    private static final long serialVersionUID=1L;
    @Schema(description="菜单拓展属性ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @Schema(description="关联的菜单ID")
    private Integer menuId;
    @Schema(description="标题（支持i18n key或直接文本）")
    private String title;
    @Schema(description="图标编码（如iconfont的Unicode）")
    private String icon;
    @Schema(description="是否显示徽章")
    private boolean showBadge;
    @Schema(description="文本徽章内容（如Hot/New）")
    private String showTextBadge;
    @Schema(description="是否在菜单中隐藏")
    @JsonProperty("isHide")
    private boolean isHide;
    @Schema(description="是否在标签页中隐藏")
    @JsonProperty("isHideTab")
    private boolean isHideTab;
    @Schema(description="是否全屏页面")
    @JsonProperty("isFullPage")
    private boolean isFullPage;
    @Schema(description="外部链接地址")
    private String link;
    @Schema(description="是否iframe嵌入")
    @JsonProperty("isIframe")
    private boolean isIframe;
    @Schema(description="是否缓存页面")
    private boolean keepAlive;
    @Schema(description="是否固定标签页")
    private boolean fixedTab;
    @Schema(description="路径权限")
    private String perms;
    @Schema(description="类型，M-目录，C-菜单，A-按钮，I-内嵌，P-外链")
    @StringContains(limitValues = {"M","C","A","I","P"}, message = "未知的菜单类型")
    private String menuType;
    @Schema(description="激活菜单路径，用于没有在侧边栏的页面")
    private String activePath;
    @Schema
    @JsonIgnore
    private Boolean isDelete;
}
